package vn.codespot.hms.model.response;

import java.util.Arrays;

public class StatusResponseModel extends AbsResponseModel {
    public static final int STATUS_INVALID_CODE = -1;
    public static final int STATUS_WAITING_PAYMENT_CODE = 1;
    public static final int STATUS_PROCESSING_CODE = 2;
    public static final int STATUS_COMPLETED_CODE = 3;
    public static final int STATUS_WAITING_REFUNDED_CODE = 4;
    public static final String RESULT = "result";
    public static final String STATUS_CODE = "status_code";
    public static final String STATUS_MSG = "status_msg";
    public static final String FEE_TOTAL = "fee_total";

    public StatusResponseModel(String json) {
        super(Arrays.asList(RESULT, STATUS_CODE, STATUS_MSG, FEE_TOTAL));
        super.parse(json);
    }

    public int getStatusCode() {
        return getResponseValue(STATUS_CODE) != null ? Integer.valueOf(getResponseValue(STATUS_CODE)) : INVALID_ERROR_CODE;
    }

    public String getStatusMessage() {
        return getResponseValue(STATUS_MSG);
    }
    
    public String getFeeTotal() {
    	return getResponseValue(FEE_TOTAL);
    }
    
}
